#pragma once 

#include "Core\NervusSharedHeader.h"

namespace Nervus {
	namespace Core {
		

		class Window {
			friend class Render::D3D9RenderSystem;
			friend class Render::D3D11RenderSystem;

		private:
			WNDCLASSEX mWndClass;
			MSG mWndMsg;
			HWND mWndDesc;
			HINSTANCE mInstance;
			string mClassName;			
			RECT mWndRect;


			string mWndTitle;
			bool mClosed;

			Input* mWndInput;


			LRESULT winProc(HWND, UINT, WPARAM, LPARAM);
			static LRESULT CALLBACK staticWinProc(HWND, UINT, WPARAM, LPARAM);
		public:
			Window();
			~Window();

			bool launchWindow();

			bool isClosed();
			bool processWindow();
			bool isActive();

			Input* getInput();

			void setWindowTitle(string);
			void setWindowPos(u32, u32);
			void setWindowSize(u32, u32);

			u32 getWindowWidth();
			u32 getWindowHeight();
		};
	}
}